//package org.zfes.snowier.cloud.zbss.metting.router.service.pub;
//
//import java.io.IOException;
//import java.io.OutputStream;
//import java.util.Optional;
//
//import javax.servlet.http.HttpServletResponse;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.zfes.snowier.web.controller.BaseController;
//
//import com.google.zxing.BarcodeFormat;
//import com.google.zxing.WriterException;
//import com.google.zxing.client.j2se.MatrixToImageWriter;
//import com.google.zxing.common.BitMatrix;
//import com.google.zxing.qrcode.QRCodeWriter;
//@Controller("org.zfes.snowier.cloud.zbss.metting.router.service.pub.MetQrController") 
//@RequestMapping("/")
//public class MetQrController extends BaseController {
//
//	@Autowired
//	private IMetMettingSignupService settingSignupService;    
//    
//    @RequestMapping(value="/qr/{id}", method = RequestMethod.GET)
//	public void qr(@PathVariable("id")  Long id,HttpServletResponse response) throws IOException, WriterException{
//		Optional<MetMettingSignup> ops = settingSignupService.loadMetMettingSignupById(id);
//		String content=ops.isPresent()?""+ops.get().getId():""+-1;
//		int width=200;
//		int height=200;
//		OutputStream stream=response.getOutputStream();
//		QRCodeWriter writer=new QRCodeWriter();
//		BitMatrix m=writer.encode(content, BarcodeFormat.QR_CODE, height,width);
//		MatrixToImageWriter.writeToStream(m, "png", stream);
//		
//	}
//    
//}